package cn.avalon.service.impl;

import cn.avalon.domain.Store;
import cn.avalon.mapper.StoreMapper;
import cn.avalon.service.StoreService;
import cn.avalon.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @author: Avalon
 * @date: 2022年09月19日 ： 22:13
 * @version: ver1.0
 * @email 709785494@qq.com
 */
@Service
public class StoreServiceImpl implements StoreService {

    @Autowired
    private StoreMapper storeMapper;

    @Override
    public AjaxResult add(Store store) {

        try {
            storeMapper.add(store);
            return new AjaxResult();
        } catch (Exception e) {
            e.printStackTrace();
            return new AjaxResult(false, "操作失败，请重试！");
        }
    }
}
